package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DouyinCouponRedemptionMapper;
import com.ruoyi.system.domain.DouyinCouponRedemption;
import com.ruoyi.system.service.IDouyinCouponRedemptionService;

/**
 * 抖音券兑换设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class DouyinCouponRedemptionServiceImpl implements IDouyinCouponRedemptionService
{
    @Autowired
    private DouyinCouponRedemptionMapper douyinCouponRedemptionMapper;

    /**
     * 通过id查询抖音券兑换设置
     *
     * @param id 抖音券兑换设置主键
     * @return 抖音券兑换设置
     */
    @Override
    public DouyinCouponRedemption selectDouyinCouponRedemptionById(Long id)
    {
        return douyinCouponRedemptionMapper.selectDouyinCouponRedemptionById(id);
    }

    /**
     * 通过门店名称查询抖音券兑换设置列表
     *
     * @param storeName 门店名称
     * @return 抖音券兑换设置
     */
    @Override
    public List<DouyinCouponRedemption> selectDouyinCouponRedemptionListByName(String storeName)
    {
        return douyinCouponRedemptionMapper.selectDouyinCouponRedemptionListByName(storeName);
    }

    /**
     * 新增抖音券兑换设置
     *
     * @param douyinCouponRedemption 抖音券兑换设置
     * @return 结果
     */
    @Override
    public int insertDouyinCouponRedemption(DouyinCouponRedemption douyinCouponRedemption)
    {
        return douyinCouponRedemptionMapper.insertDouyinCouponRedemption(douyinCouponRedemption);
    }

    /**
     * 修改抖音券兑换设置
     *
     * @param douyinCouponRedemption 抖音券兑换设置
     * @return 结果
     */
    @Override
    public int updateDouyinCouponRedemption(DouyinCouponRedemption douyinCouponRedemption)
    {
        return douyinCouponRedemptionMapper.updateDouyinCouponRedemption(douyinCouponRedemption);
    }

    /**
     * 通过id批量删除抖音券兑换设置信息
     *
     * @param ids 需要删除的抖音券兑换设置主键
     * @return 结果
     */
    @Override
    public int deleteDouyinCouponRedemptionByIds(Long[] ids)
    {
        return douyinCouponRedemptionMapper.deleteDouyinCouponRedemptionByIds(ids);
    }

    /**
     * 通过id删除抖音券兑换设置信息
     *
     * @param id 抖音券兑换设置主键
     * @return 结果
     */
    @Override
    public int deleteDouyinCouponRedemptionById(Long id)
    {
        return douyinCouponRedemptionMapper.deleteDouyinCouponRedemptionById(id);
    }
}
